<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gdk-pixbuf-csource</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GDK-PixBuf Reference Manual">
<link rel="up" href="rn02.html" title="Tools Reference">
<link rel="prev" href="rn02.html" title="Tools Reference">
<link rel="next" href="gdk-pixbuf-query-loaders.html" title="gdk-pixbuf-query-loaders">
<meta name="generator" content="GTK-Doc V1.17.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="rn02.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="rn02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GDK-PixBuf Reference Manual</th>
<td><a accesskey="n" href="gdk-pixbuf-query-loaders.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gdk-pixbuf-csource"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle">gdk-pixbuf-csource</span></h2>
<p>gdk-pixbuf-csource — C code generation utility for GdkPixbuf images</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p><code class="command">gdk-pixbuf-csource</code>  [options] [image]</p></div>
<div class="cmdsynopsis"><p><code class="command">gdk-pixbuf-csource</code>  [options]  --build-list  [
  [name]
   [image]
...]</p></div>
</div>
<div class="refsect1">
<a name="id455056"></a><h2>Description</h2>
<p>
<span class="command"><strong>gdk-pixbuf-csource</strong></span> is a small utility that generates
C code containing images, useful for compiling images directly into programs.
</p>
</div>
<div class="refsect1">
<a name="id496425"></a><h2>Invocation</h2>
<p>
<span class="command"><strong>gdk-pixbuf-csource</strong></span> either takes as input one image file
name to generate code for, or, using the <code class="option">--build-list</code> option,
a list of (<em class="replaceable"><code>name</code></em>, <em class="replaceable"><code>image</code></em>)
pairs to generate code for a list of images into named variables.
</p>
<div class="refsect2">
<a name="id455809"></a><h3>Options</h3>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><code class="option">--stream</code></span></p></td>
<td><p>
Generate pixbuf data stream (a single string containing a serialized
<span class="structname">GdkPixdata</span> structure in network byte order).
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--struct</code></span></p></td>
<td><p>
Generate GdkPixdata structure (needs the <span class="structname">GdkPixdata</span>
structure definition from <code class="filename">gdk-pixdata.h</code>).
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--macros</code></span></p></td>
<td><p>
Generate *_ROWSTRIDE, *_WIDTH, *_HEIGHT, *_BYTES_PER_PIXEL and
*_RLE_PIXEL_DATA or *_PIXEL_DATA macro definitions for the image.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--rle</code></span></p></td>
<td><p>
Enables run-length encoding for the generated pixel data (default).
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--raw</code></span></p></td>
<td><p>
Disables run-length encoding for the generated pixel data.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--extern</code></span></p></td>
<td><p>
Generate extern symbols.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--static</code></span></p></td>
<td><p>
Generate static symbols (default).
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--decoder</code></span></p></td>
<td><p>
Provide a *_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp) macro definition
to decode run-length encoded image data.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--name=identifier</code></span></p></td>
<td><p>
Specifies the identifier name (prefix) for the generated variables or
macros (useful only if <code class="option">--build-list</code> was not specified).
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--build-list</code></span></p></td>
<td><p>
Enables (<em class="replaceable"><code>name</code></em>, <em class="replaceable"><code>image</code></em>)
pair parsing mode.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">-h</code>, <code class="option">--help</code></span></p></td>
<td><p>
Print brief help and exit.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">-v</code>, <code class="option">--version</code></span></p></td>
<td><p>
Print version and exit.
</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="option">--g-fatal-warnings</code></span></p></td>
<td><p>
Make warnings fatal (causes the program to abort).
</p></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="id500637"></a><h2>See also</h2>
<p>
The <span class="structname">GdkPixbuf</span> documentation, shipped with the
Gtk+ distribution, available from <a class="ulink" href="http://www.gtk.org" target="_top">www.gtk.org</a>.
</p>
</div>
<div class="refsect1">
<a name="id500656"></a><h2>Bugs</h2>
<p>
The runlength encoder gets out of sync with the pixel boundaries, since
it includes the rowstride padding in the encoded stream. Furthermore, it
generates pixbufs with suboptimal rowstride in some cases.
</p>
</div>
<div class="refsect1">
<a name="id500668"></a><h2>Author</h2>
<p>
<span class="command"><strong>gdk-pixbuf-csource</strong></span> was written by Tim Janik
<code class="email">&lt;<a class="email" href="mailto:timj@gtk.org">timj@gtk.org</a>&gt;</code>.
</p>
<p>
This manual page was provided by Tim Janik <code class="email">&lt;<a class="email" href="mailto:timj@gtk.org">timj@gtk.org</a>&gt;</code>.
</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.17.1</div>
</body>
</html>